package com.yjhh.scala


import sys.process._

/**
  *
  *
  */
object HelloRegExpAndCMD {
  def main(args: Array[String]): Unit = {
    //"javac D:\\workplace\\TestScala\\src\\com\\yjhh\\scala\\Hello.java" !;
    //"java -version" !;
    //"dir" !;
    //"java com.yjhh.scala.Hello" !
    var reg = "[a-z]+".r
    println(reg)

    println(reg.findFirstIn("Spark is cool"))

    for(matchItem <- reg.findAllIn("Spark is cool")){
      println(matchItem)
    }

    println(reg.replaceAllIn("Spark is cool","123"))

    val pattern = "[0-9]+".r

  }
}
